#pragma once
#include <math.h>

using namespace std;

namespace U31
{
	class Recfunc
	{
	public:

		Recfunc(void)
		{
		}

		~Recfunc(void)
		{
		}


		int itterativ_sum(int tal)
		{
			int sum = 0;
			double i = 1;

			while (tal > 0 )
			{
				sum += tal * (1 / sqrt(i));
				tal -= 1;
			}
			
			return sum;
		
		}


		int Recfunc_sum(int tal, int &sum)
		{
			;
			double i = 1;
			
			if (tal < 1)
			{
				return 0;
			}
			else
			{
				sum += tal * (1 / sqrt(i));
				Recfunc_sum(tal - 1, sum);
			}

			return sum;
		}


	};

}